# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=nmon
pkgver=16n
pkgrel=2
pkgdesc="AIX & Linux Performance Monitoring tool"
arch=('loong64' 'x86_64')
url="http://nmon.sourceforge.net"
license=('GPL')
depends=('ncurses')
options=('debug')
source=("https://downloads.sourceforge.net/$pkgname/lmon$pkgver.c")
sha256sums=('c0012cc2d925dee940c37ceae297abac64ba5a5c30e575e7418b04028613f5f2')

build() {
  cd "$srcdir"
  cc -o nmon lmon$pkgver.c $LDFLAGS $CFLAGS -g -O3 -lncurses -lm -D X86
}

package() {
  cd "$srcdir"
  install -D -m 0755 nmon "$pkgdir/usr/bin/nmon"
}
